ed329b8bcad919906f8f13068621373d6ea163f3,Frameworks/EOF/ERRest/Sources/er/rest/ERXEORestDelegate.java,ERXEORestDelegate,delegateForEntity,#EOClassDescription#,125

Before Change


		String entityName = entity.entityName();
		Class<?> entityDelegateClass = _NSUtilities.classWithName(entityName + "RestDelegate");
		if (entityDelegateClass != null) {
			Class<? extends IERXRestDelegate> castEntityDelegateClass = entityDelegateClass.asSubclass(IERXRestDelegate.class);
			try {
				return castEntityDelegateClass.newInstance();
			}
			catch (Throwable t) {
				throw new RuntimeException("Failed to create a delegate for the entity '" + entityName + "'.", t);

After Change


		return obj;
	}

	protected Object fetchObjectOfEntityWithID(EOClassDescription entity, Object id) {
		Object obj;
		if (entity instanceof EOEntityClassDescription) {
			EOEntity eoEntity = ((EOEntityClassDescription) entity).entity();
			String strPKValue = String.valueOf(id);
			Object pkValue = ((EOAttribute) eoEntity.primaryKeyAttributes().objectAtIndex(0)).validateValue(strPKValue);
			_editingContext.lock();
			try {
				obj = ERXEOControlUtilities.objectWithPrimaryKeyValue(_editingContext, eoEntity.name(), pkValue, null, false);